﻿Public Class F08_M_anverso_

    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        Me.Close()
        F08_M_reverso_.Show()
    End Sub

    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click

        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF08MANegocios As New Negocios.NF08_MA
        Dim oF08MA As New Entidades.EF08Vehiculos
        oF08MA.numformu = UCase(txtnumform.Text)
        oF08MA.lugarfech = UCase(txtlugarfecha.Text)
        oF08MA.precioo = UCase(txtprecio.Text)
        oF08MA.chapaa = UCase(txtchapa.Text)
        oF08MA.porcentajecomprr = UCase(txtporcentajecompr.Text)
        oF08MA.apecomprr = UCase(txtapecompr.Text)
        oF08MA.callecomprr = UCase(txtcallecompr.Text)
        oF08MA.numcomprr = UCase(txtnumcompr.Text)
        oF08MA.pisocomprr = UCase(txtpisocompr.Text)
        oF08MA.dptocomprr = UCase(txtdptocompr.Text)
        oF08MA.codpostalcomprr = UCase(txtcodpostalcompr.Text)
        oF08MA.loccomprr = UCase(txtloccompr.Text)
        oF08MA.partdptocomprr = UCase(txtpartdptocompr.Text)
        oF08MA.provcomprr = UCase(txtprovcompr.Text)
        oF08MA.dnicomprr = UCase(txtdnicompr.Text)
        oF08MA.lecomprr = UCase(txtlecompr.Text)
        oF08MA.lccomprr = UCase(txtlccompr.Text)
        oF08MA.dniextrcomprr = UCase(txtdniextrcompr.Text)
        oF08MA.ciextrcomprr = UCase(txtciextrcompr.Text)
        oF08MA.pasapcomprr = UCase(txtpasapcompr.Text)
        oF08MA.numdoccomprr = UCase(txtnumdoccompr.Text)
        oF08MA.autoridadcomprr = UCase(txtautoridadcompr.Text)
        oF08MA.dianaccomprr = UCase(txtdianaccompr.Text)
        oF08MA.mesnaccomprr = UCase(txtmesnacompr.Text)
        oF08MA.añonaccomprr = UCase(txtañonaccompr.Text)
        oF08MA.solterocomprr = UCase(txtsolterocompr.Text)
        oF08MA.casadocomprr = UCase(txtcasadocompr.Text)
        oF08MA.viudocomprr = UCase(txtvuidocompr.Text)
        oF08MA.divcomprr = UCase(txtdivcompr.Text)
        oF08MA.numnupciacomprr = UCase(txtnumnupciacompr.Text)
        oF08MA.apenomconycomprr = UCase(txtapenomconycompr.Text)
        oF08MA.personeriacomprr = UCase(txtpersoneriacompr.Text)
        oF08MA.insccomprr = UCase(txtinsccompr.Text)
        oF08MA.diainsccomprr = UCase(txtdiainsccompr.Text)
        oF08MA.mesinsccomprr = UCase(txtmesinsccompr.Text)
        oF08MA.añoinsccomprr = UCase(txtañoinsccompr.Text)
        oF08MA.porcentajecodd = UCase(txtporcentajecond.Text)
        oF08MA.apecodd = UCase(txtapecond.Text)
        oF08MA.callecodd = UCase(txtcallecompr.Text)
        oF08MA.numcodd = UCase(txtnumcompr.Text)
        oF08MA.pisocodd = UCase(txtpisocompr.Text)
        oF08MA.dptocodd = UCase(txtdptocompr.Text)
        oF08MA.codpostalcodd = UCase(txtcodpostalcompr.Text)
        oF08MA.loccodd = UCase(txtloccompr.Text)
        oF08MA.partdptocodd = UCase(txtpartdptocompr.Text)
        oF08MA.provcodd = UCase(txtprovcompr.Text)
        oF08MA.dnicodd = UCase(txtdnicompr.Text)
        oF08MA.lecodd = UCase(txtlecompr.Text)
        oF08MA.lccodd = UCase(txtlccompr.Text)
        oF08MA.dniextrcodd = UCase(txtdniextrcompr.Text)
        oF08MA.ciextrcodd = UCase(txtciextrcompr.Text)
        oF08MA.pasapcodd = UCase(txtpasapcompr.Text)
        oF08MA.numdoccodd = UCase(txtnumdoccompr.Text)
        oF08MA.autoridadcodd = UCase(txtautoridadcompr.Text)
        oF08MA.dianaccodd = UCase(txtdianaccompr.Text)
        oF08MA.mesnaccodd = UCase(txtmesnacompr.Text)
        oF08MA.añonaccodd = UCase(txtañonaccompr.Text)
        oF08MA.solterocodd = UCase(txtsolterocompr.Text)
        oF08MA.casadocodd = UCase(txtcasadocompr.Text)
        oF08MA.viudocodd = UCase(txtvuidocompr.Text)
        oF08MA.divcodd = UCase(txtdivcompr.Text)
        oF08MA.numnupciacodd = UCase(txtnumnupciacompr.Text)
        oF08MA.apenomconycodd = UCase(txtapenomconycompr.Text)
        oF08MA.personeriacodd = UCase(txtpersoneriacompr.Text)
        oF08MA.insccodd = UCase(txtinsccompr.Text)
        oF08MA.diainsccodd = UCase(txtdiainsccompr.Text)
        oF08MA.mesinsccodd = UCase(txtmesinsccompr.Text)
        oF08MA.añoinsccodd = UCase(txtañoinsccompr.Text)
        oF08MA.optasii = UCase(txtoptasi.Text)
        oF08MA.optanoo = UCase(txtoptano.Text)
        oF08MA.dominioo = UCase(txtdominio.Text)
        oF08MA.marcaa = UCase(txtmarca.Text)
        oF08MA.tipoo = UCase(txttipo.Text)
        oF08MA.modeloo = UCase(txtmodelo.Text)
        oF08MA.marcamotorr = UCase(txtmarcamotor.Text)
        oF08MA.nummotorr = UCase(txtnummotor.Text)
        oF08MA.marcachasiss = UCase(txtmarcachasis.Text)
        oF08MA.numchasiss = UCase(txtnumchasis.Text)
        oF08MA.usoo = UCase(txtuso.Text)
        oF08MA.lugaryfechaa = UCase(txtlugaryfecha.Text)
        oF08MA.fechainscc1 = UCase(txtfechainsc1.Text)
        oF08MA.importee1 = UCase(txtimporte1.Text)
        oF08MA.acreedorr1 = UCase(txtacreedor1.Text)
        oF08MA.fechainscc2 = UCase(txtfechainsc2.Text)
        oF08MA.importee2 = UCase(txtimporte2.Text)
        oF08MA.acreedorr2 = UCase(txtacreedor2.Text)
        
        Try
            If oF08MANegocios.guardarF08MA(oF08MA) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF08MANegocios As New Negocios.NF08_MA
        Dim oF08MA As New Entidades.EF08Vehiculos
        oF08MA.numformu = UCase(txtnumform.Text)
        oF08MA.lugarfech = UCase(txtlugarfecha.Text)
        oF08MA.precioo = UCase(txtprecio.Text)
        oF08MA.chapaa = UCase(txtchapa.Text)
        oF08MA.porcentajecomprr = UCase(txtporcentajecompr.Text)
        oF08MA.apecomprr = UCase(txtapecompr.Text)
        oF08MA.callecomprr = UCase(txtcallecompr.Text)
        oF08MA.numcomprr = UCase(txtnumcompr.Text)
        oF08MA.pisocomprr = UCase(txtpisocompr.Text)
        oF08MA.dptocomprr = UCase(txtdptocompr.Text)
        oF08MA.codpostalcomprr = UCase(txtcodpostalcompr.Text)
        oF08MA.loccomprr = UCase(txtloccompr.Text)
        oF08MA.partdptocomprr = UCase(txtpartdptocompr.Text)
        oF08MA.provcomprr = UCase(txtprovcompr.Text)
        oF08MA.dnicomprr = UCase(txtdnicompr.Text)
        oF08MA.lecomprr = UCase(txtlecompr.Text)
        oF08MA.lccomprr = UCase(txtlccompr.Text)
        oF08MA.dniextrcomprr = UCase(txtdniextrcompr.Text)
        oF08MA.ciextrcomprr = UCase(txtciextrcompr.Text)
        oF08MA.pasapcomprr = UCase(txtpasapcompr.Text)
        oF08MA.numdoccomprr = UCase(txtnumdoccompr.Text)
        oF08MA.autoridadcomprr = UCase(txtautoridadcompr.Text)
        oF08MA.dianaccomprr = UCase(txtdianaccompr.Text)
        oF08MA.mesnaccomprr = UCase(txtmesnacompr.Text)
        oF08MA.añonaccomprr = UCase(txtañonaccompr.Text)
        oF08MA.solterocomprr = UCase(txtsolterocompr.Text)
        oF08MA.casadocomprr = UCase(txtcasadocompr.Text)
        oF08MA.viudocomprr = UCase(txtvuidocompr.Text)
        oF08MA.divcomprr = UCase(txtdivcompr.Text)
        oF08MA.numnupciacomprr = UCase(txtnumnupciacompr.Text)
        oF08MA.apenomconycomprr = UCase(txtapenomconycompr.Text)
        oF08MA.personeriacomprr = UCase(txtpersoneriacompr.Text)
        oF08MA.insccomprr = UCase(txtinsccompr.Text)
        oF08MA.diainsccomprr = UCase(txtdiainsccompr.Text)
        oF08MA.mesinsccomprr = UCase(txtmesinsccompr.Text)
        oF08MA.añoinsccomprr = UCase(txtañoinsccompr.Text)
        oF08MA.porcentajecodd = UCase(txtporcentajecond.Text)
        oF08MA.apecodd = UCase(txtapecond.Text)
        oF08MA.callecodd = UCase(txtcallecompr.Text)
        oF08MA.numcodd = UCase(txtnumcompr.Text)
        oF08MA.pisocodd = UCase(txtpisocompr.Text)
        oF08MA.dptocodd = UCase(txtdptocompr.Text)
        oF08MA.codpostalcodd = UCase(txtcodpostalcompr.Text)
        oF08MA.loccodd = UCase(txtloccompr.Text)
        oF08MA.partdptocodd = UCase(txtpartdptocompr.Text)
        oF08MA.provcodd = UCase(txtprovcompr.Text)
        oF08MA.dnicodd = UCase(txtdnicompr.Text)
        oF08MA.lecodd = UCase(txtlecompr.Text)
        oF08MA.lccodd = UCase(txtlccompr.Text)
        oF08MA.dniextrcodd = UCase(txtdniextrcompr.Text)
        oF08MA.ciextrcodd = UCase(txtciextrcompr.Text)
        oF08MA.pasapcodd = UCase(txtpasapcompr.Text)
        oF08MA.numdoccodd = UCase(txtnumdoccompr.Text)
        oF08MA.autoridadcodd = UCase(txtautoridadcompr.Text)
        oF08MA.dianaccodd = UCase(txtdianaccompr.Text)
        oF08MA.mesnaccodd = UCase(txtmesnacompr.Text)
        oF08MA.añonaccodd = UCase(txtañonaccompr.Text)
        oF08MA.solterocodd = UCase(txtsolterocompr.Text)
        oF08MA.casadocodd = UCase(txtcasadocompr.Text)
        oF08MA.viudocodd = UCase(txtvuidocompr.Text)
        oF08MA.divcodd = UCase(txtdivcompr.Text)
        oF08MA.numnupciacodd = UCase(txtnumnupciacompr.Text)
        oF08MA.apenomconycodd = UCase(txtapenomconycompr.Text)
        oF08MA.personeriacodd = UCase(txtpersoneriacompr.Text)
        oF08MA.insccodd = UCase(txtinsccompr.Text)
        oF08MA.diainsccodd = UCase(txtdiainsccompr.Text)
        oF08MA.mesinsccodd = UCase(txtmesinsccompr.Text)
        oF08MA.añoinsccodd = UCase(txtañoinsccompr.Text)
        oF08MA.optasii = UCase(txtoptasi.Text)
        oF08MA.optanoo = UCase(txtoptano.Text)
        oF08MA.dominioo = UCase(txtdominio.Text)
        oF08MA.marcaa = UCase(txtmarca.Text)
        oF08MA.tipoo = UCase(txttipo.Text)
        oF08MA.modeloo = UCase(txtmodelo.Text)
        oF08MA.marcamotorr = UCase(txtmarcamotor.Text)
        oF08MA.nummotorr = UCase(txtnummotor.Text)
        oF08MA.marcachasiss = UCase(txtmarcachasis.Text)
        oF08MA.numchasiss = UCase(txtnumchasis.Text)
        oF08MA.usoo = UCase(txtuso.Text)
        oF08MA.lugaryfechaa = UCase(txtlugaryfecha.Text)
        oF08MA.fechainscc1 = UCase(txtfechainsc1.Text)
        oF08MA.importee1 = UCase(txtimporte1.Text)
        oF08MA.acreedorr1 = UCase(txtacreedor1.Text)
        oF08MA.fechainscc2 = UCase(txtfechainsc2.Text)
        oF08MA.importee2 = UCase(txtimporte2.Text)
        oF08MA.acreedorr2 = UCase(txtacreedor2.Text)
        Try
            If oF08MANegocios.editarF08MA(oF08MA) Then
                MsgBox("La Edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarReverso.Click
        F08_M_reverso_.Show()
    End Sub

    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtnumform.Text = ""
        txtlugarfecha.Text = ""
        txtprecio.Text = ""
        txtchapa.Text = ""
        txtporcentajecompr.Text = ""
        txtapecompr.Text = ""
        txtcallecompr.Text = ""
        txtnumcompr.Text = ""
        txtpisocompr.Text = ""
        txtdptocompr.Text = ""
        txtcodpostalcompr.Text = ""
        txtloccompr.Text = ""
        txtpartdptocompr.Text = ""
        txtprovcompr.Text = ""
        txtdnicompr.Text = ""
        txtlecompr.Text = ""
        txtlccompr.Text = ""
        txtdniextrcompr.Text = ""
        txtciextrcompr.Text = ""
        txtpasapcompr.Text = ""
        txtnumdoccompr.Text = ""
        txtautoridadcompr.Text = ""
        txtdianaccompr.Text = ""
        txtmesnacompr.Text = ""
        txtañonaccompr.Text = ""
        txtsolterocompr.Text = ""
        txtcasadocompr.Text = ""
        txtvuidocompr.Text = ""
        txtdivcompr.Text = ""
        txtnumnupciacompr.Text = ""
        txtapenomconycompr.Text = ""
        txtpersoneriacompr.Text = ""
        txtinsccompr.Text = ""
        txtdiainsccompr.Text = ""
        txtdiainsccompr.Text = ""
        txtmesinsccompr.Text = ""
        txtañoinsccompr.Text = ""
        txtporcentajecond.Text = ""
        txtapecond.Text = ""
        txtcallecond.Text = ""
        txtnumcond.Text = ""
        txtpisocond.Text = ""
        txtdptocond.Text = ""
        txtcodpostalcond.Text = ""
        txtloccond.Text = ""
        txtpartdptocond.Text = ""
        txtprovcond.Text = ""
        txtdnicond.Text = ""
        txtlecond.Text = ""
        txtlccond.Text = ""
        txtdniextrcond.Text = ""
        txtciextrcond.Text = ""
        txtpasapcond.Text = ""
        txtnumdoccond.Text = ""
        txtautoridadcond.Text = ""
        txtdianaccond.Text = ""
        txtmesnaccond.Text = ""
        txtañonaccond.Text = ""
        txtsolterocond.Text = ""
        txtcasadocond.Text = ""
        txtvuidocond.Text = ""
        txtdivcond.Text = ""
        txtnumnupciacond.Text = ""
        txtapenomconycond.Text = ""
        txtpersoneriacond.Text = ""
        txtinsccond.Text = ""
        txtdiainsccond.Text = ""
        txtdiainsccond.Text = ""
        txtmesinsccond.Text = ""
        txtañoinsccond.Text = ""
        txtoptasi.Text = ""
        txtoptano.Text = ""
        txtdominio.Text = ""
        txtmarca.Text = ""
        txttipo.Text = ""
        txtmodelo.Text = ""
        txtmarcamotor.Text = ""
        txtnummotor.Text = ""
        txtmarcachasis.Text = ""
        txtnumchasis.Text = ""
        txtuso.Text = ""
        txtlugaryfecha.Text = ""
        txtfechainsc1.Text = ""
        txtimporte1.Text = ""
        txtacreedor1.Text = ""
        txtfechainsc2.Text = ""
        txtimporte2.Text = ""
        txtacreedor2.Text = ""

    End Sub

    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02M.Click
        F02_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF04V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF04V.Click
        F04_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub


    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF11M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11M.Click
        F11_M_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub

    Private Sub btnF99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF99.Click
        F99.Show()
        Me.Close()
    End Sub

    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnFR00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFR00.Click
        F_R00.Show()
        Me.Close()
    End Sub
End Class
